package sharemem

type MonsterAttr struct {
	Id int32
	At [UNIT_ATTR_MAX]Attr
}

func (tmp *MonsterAttr) meminit() {
	var i int32
	tmp.Id = 0
	for i = 0; i < UNIT_ATTR_MAX; i++ {
		tmp.At[i].Id = 0
		tmp.At[i].Val = 0
	}
}
func (tmp *MonsterAttr) isUse() bool {
	return tmp.Id > 0
}
func (tmp *MonsterAttr) getId() int32 {
	return tmp.Id
}

func Get_config_monster_attr(id int32) *MonsterAttr {
	v, ok := GetConfigMonsterAttrMap()[id]
	if !ok {
		return nil
	}

	return v
}
